from sqlalchemy import (
    Boolean,
    Column,
    Integer,
    String,
    Text,
    DateTime,
    ForeignKey,
    JSON,
    BigInteger,
)
from app.database import Base
from sqlalchemy.orm import relationship, Mapped
from typing import List

class Activity(Base):
    __tablename__ = "activity"

    id = Column("id", BigInteger, primary_key=True, autoincrement=True)
    name = Column(String(255))
    activity_time = Column(DateTime)
    additional_conditions = Column(Text)
    content = Column(Text)
    count_limit = Column(String(50))
    location = Column(String(255))
    submission_deadline = Column(DateTime)
    poster = Column(String(255))
    type = Column(Integer)
    publisher = Column(BigInteger, ForeignKey("admin.id"))
    wjxurl = Column(String(255))
    campuses = Column(Integer)

    publisher_relation: Mapped["Admin"] = relationship()
